import extraConfigEvent from '@/common/extra-config-event.js';
import { EMIT_PARAMS_OBJ } from '@/utils/constant';
import { $demoi18n } from '@/utils/lang';

const config = {
  isCustomProertyPannel: true,
  propertyPannelName: `config_${process.env.xvueNameSpace_}remote_control_button`,
  config: {
    property: {
      componentStyle: window._adoPremise.uc.theme,
      buttons: [{ name: 'button', value: 'button' }],
      allBtnConf: {},
      justify: 'flex_start',
      name: '',
      type: 'qiting',
      distance: 10,
      verifyType: 'password',
      desc: '',
      tooltip: {
        vars: {
          'equipment_id': '',
          'equipment_status': '',
        },
      },
      data: [
        {
          name: '',
          status: '',
        },
      ],
    },
    data: {
      dataSourceType: 'staticData',
      dataSource: '',
      apiCode: '',
      redisKey: '',
      dataPackage: '',
      dataTable: '',
      tableData: [],
    },
  },
  events: [
    {
      id: '5f8f272e-58f2-e9f8-22e0-701228511044',
      key: 'remote-control-button-clicked',
      label: '点击事件',
      type: 'out',
      description: '',
      parameters: [
        {
          id: 'fcdabda1-bf9a-0a0b-4381-1f4a510a5d46',
          key: 'key',
          label: $demoi18n('panelEvent.label.eventKey'),
          value: '',
        },
        {
          id: '9b5a96d5-2c55-de9a-ff31-96fe7c3be87b',
          key: EMIT_PARAMS_OBJ,
          label: '发出参数对象',
          hide: true,
          value: '',
        },
      ],
    },
    ...extraConfigEvent,
  ],
};

export default config;
